import request from '@/utils/request'
import { downFile } from '@/utils/request'

/**
 * 房间日历表分页查询
 * @param {查询条件} data
 */
export function listLayRoomPrice(query) {
  return request({
    url: 'business/LayRoomPrice/list',
    method: 'get',
    params: query,
  })
}

/**
 * 新增房间日历表
 * @param data
 */
export function addLayRoomPrice(data) {
  return request({
    url: 'business/LayRoomPrice',
    method: 'post',
    data: data,
  })
}
/**
 * 修改房间日历表
 * @param data
 */
export function updateLayRoomPrice(data) {
  return request({
    url: 'business/LayRoomPrice',
    method: 'PUT',
    data: data,
  })
}
/**
 * 获取房间日历表详情
 * @param {Id}
 */
export function getLayRoomPrice(id) {
  return request({
    url: 'business/LayRoomPrice/' + id,
    method: 'get'
  })
}
/**
 * 获取房型规格日历表
 * @param {Id}
 */
export function LayRoomPriceCalendar(id) {
  return request({
    url: 'business/LayRoomPrice/LayRoomPriceCalendar?id=' + id,
    method: 'get'
  })
}
/**
 * 删除房间日历表
 * @param {主键} pid
 */
export function delLayRoomPrice(pid) {
  return request({
    url: 'business/LayRoomPrice/delete/' + pid,
    method: 'POST'
  })
}
// 导出房间日历表
export async function exportLayRoomPrice(query) {
  await downFile('business/LayRoomPrice/export', { ...query })
}
